package com.troila.cloud.simplify.config;

import javax.servlet.Filter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.troila.cloud.simplify.filter.SessionFilter;


/**
 * 过滤器配置
 * @author zhoubing
 *
 */
//@Configuration
public class FilterConfig {
    /**
     * 配置过滤器
     * @return
     */
//    @Bean
//    public FilterRegistrationBean someFilterRegistration() {
//        FilterRegistrationBean registration = new FilterRegistrationBean();
//        registration.setFilter(sessionFilter());
//        registration.addUrlPatterns("/*");
//        registration.addInitParameter("paramName", "paramValue");
//        registration.setName("sessionFilter");
//        return registration;
//    }

    /**
     * 创建一个bean
     * @return
     */
//    @Bean(name = "sessionFilter")
//    public Filter sessionFilter() {
//        return new SessionFilter();
//    }
}
